package muyuu;

public class muylu {
    private String brand;
    private String efficacy;
    private String address;
    static int a = 10;
    public int b = 10;//
    int c = 33;//默认权限

    public static void main(String[] args) {
        System.out.println(a);
        a = 100;
        muylu hh = new muylu();
        System.out.println(hh.a);
        muylu.a = 102;
        xifashui hhh = new xifashui();
        hhh.text();
        //static修饰变量变为静态变量
        //变成了类变量，会储存在方法区，生命周期和类的相同
        xifashui.brand = "hadage";//调用不依赖与对象，类名就可以调用
        System.out.println(xifashui.brand);
    }

    //自动生成的构造方法

    public muylu() {

    }

    public muylu(String brand, String efficacy, String address) {

        this.brand = brand;
        this.efficacy = efficacy;
        this.address = address;
    }
    public void ss() {
        //同一个包同一个类中访问 default
        System.out.println(a);
    }

    public String getBrand() {
        return brand;
    }

    public void setBrand(String brand) {
        this.brand = brand;
    }

    public String getEfficacy() {
        return efficacy;
    }

    public void setEfficacy(String efficacy) {
        this.efficacy = efficacy;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
}
